Repository navigation
Review sweeps read reviewer configs by key, so every repository is reached - #513
Merged
Merged
Conversation
…ached The stuck-review and review-reminder sweeps found their configs with a filtered scan of the whole settings table, capped at 50 pages. That table also holds analytics and rollups (about 137k items, 174 MB), so every tick stopped long before reaching the handful of configs: both sweeps reported no repositories on every run, stuck reviews were never sent again and reminders were never posted. The teams that have a per-repository config are now kept in an index partition (INDEX#REVIEW_CONFIG). Saving a config adds the team; readers rebuild the index from one full scan when it was never built or is a day old, so configs saved before the index existed are found. A member is the config's own partition key, so a team is swept however it is recorded elsewhere, including teams with no teams-table record. Both sweeps share one reader that queries each indexed team's configs by key, reads every page, drops teams with no configs left from the index, and logs how many teams and configs it read.
nambok
force-pushed
the
sweep-config-cursor
branch
from
November 7, 2026 18:32
36878b8 to
3a6ab7e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The stuck-review and review-reminder sweeps never reached any repository. They looked for reviewer configs with a filtered scan of the whole settings table, capped at 50 pages. That table also holds analytics, rollups and markers, so on a busy install every tick stopped before reaching the configs. On a busy install, every sweep reported
repos: 0/ "no repos with reminders configured", while repositories had the reviewer and reminders on. So stuck reviews were never sent again, and reminders were never posted.Changes
common::settings_index(same module as the settings scan fix; whichever lands second keeps one copy): an index partitionINDEX#<name>that writers append to, with a rebuild from one full scan when it was never built or is older than a day.common::review_config_index: theREVIEW_CONFIGindex. A member is the config's own partition key, so a team is found however it is recorded elsewhere, including teams with no teams-table record.update_config: after saving a config, adds the team to the index. A failed index write is logged and doesn't fail the save; the daily rebuild catches it.passes/review_configs.rs: reads the index, then queries each team'sREVIEW_CONFIG#REPO#items by key. Every page is read; a high page guard only stops a read that never ends, and logs it. A team whose read fails is skipped for that tick without hiding the others; a team with no configs left is dropped from the index. One log line per sweep gives teams read, failed and dropped, and configs read.review_sweep.rsandreview_reminder.rsuse the shared reader and keep their own checks (enabled and not killed; reminders on, a channel saved and opening, the cooldown). The old filtered scans and their page cap warnings are gone.Verification
cargo fmt,cargo clippy -p common -p worker -p gateway --all-targets -D warnings,cargo test -p workerand the common index tests pass.